﻿<UserControl x:Class="GTServices.WPF.Client.Views.ListPickerView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:ext="clr-namespace:GTServices.WPF.Client.Extensions"
             xmlns:ent="clr-namespace:GTServices.Entities;assembly=GTServices.Entities"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" 
             xmlns:converters="clr-namespace:GTServices.WPF.Client.Converters"
             xmlns:cont="clr-namespace:GTServices.WPF.Client.Controls"
             d:DesignHeight="300" d:DesignWidth="300"
             mc:Ignorable="d">
    <DockPanel>
        <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" DockPanel.Dock="Bottom">
            <cont:ClickableLabel Text="Ok"     cal:Message.Attach="[Event Click] = [Action Ok]" />
            <cont:ClickableLabel Text="Cancel" cal:Message.Attach="[Event Click] = [Action Cancel]" />
        </StackPanel>
        <DockPanel>
            <StackPanel DockPanel.Dock="Bottom">
                <Label Content="Filter: "/>
                <TextBox Text="{Binding FilterString, UpdateSourceTrigger=PropertyChanged}" />
            </StackPanel>
            <ListBox ItemsSource="{Binding Items}" 
                 SelectionMode="{Binding SelectionMode}" 
                 DockPanel.Dock="Top"
                 SelectedItem="{Binding SelectedItem}" 
                 DisplayMemberPath="{Binding DisplayMemberPath}" 
                 cal:Message.Attach="[Event SelectionChanged] = [Action SelectedItemChanged($executionContext)]">
            </ListBox>
            
        </DockPanel>
        
    </DockPanel>
</UserControl>
